
import {simpleServer} from '@/tools/servers'

/**
 * 园区资讯
 */
export class ParkNewsService {
    // 分页查询列表
    static findParkNewss (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findParkNewss,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/findParkNewss', body);
    }


    //根据园区资讯Id查询园区资讯
    static findParkNews (parkNewsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findParkNews ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/findParkNews',body);
    }

    //为了编辑,根据园区资讯Id查询园区资讯
    static findParkNewsForEdit(parkNewsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findParkNewsForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/findParkNewsForEdit',body);
    }

    //为了查看,根据园区资讯Id查询园区资讯，所有外键字段的名称都已加载
    static findParkNewsForView(parkNewsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findParkNewsForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/findParkNewsForView',body);
    }

    //创建新的园区资讯
    static createParkNews() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createParkNews,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/createParkNews',body);
    }

    //保存园区资讯
    static saveParkNews(parkNews) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveParkNews,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/saveParkNews', body);
    }

    //编辑园区资讯
    static updateParkNews (parkNews) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateParkNews,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/updateParkNews', body);
    }

    //根据园区资讯Id删除园区资讯
    static deleteParkNews (parkNewsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteParkNews,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/deleteParkNews',body);
    }

    //为了查看,根据园区资讯Id查询园区资讯，只加载ID 和 名称
    static findParkNewssWithIdNameById(parkNewsId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findParkNewssWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/findParkNewssWithIdNameById',body);
    }

    //为了查看,根据园区资讯 名称 查询园区资讯，只加载ID 和 名称
    static findParkNewssWithIdNameByName(parkNewsName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findParkNewssWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/news/ParkNews/findParkNewssWithIdNameByName',body);
    }


}
